<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>ESP8266_RTOS_SDK: Boot APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266_RTOS_SDK
   &#160;<span id="projectnumber">v1.4.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Boot APIs<div class="ingroups"><a class="el" href="group__System__APIs.html">System APIs</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>boot APIs  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga04009897446ea5a0c5aa3d3c6ef01357"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#ga04009897446ea5a0c5aa3d3c6ef01357">SYS_BOOT_ENHANCE_MODE</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga04009897446ea5a0c5aa3d3c6ef01357"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga993bbfc899c5495e5600dea34e5400bd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#ga993bbfc899c5495e5600dea34e5400bd">SYS_BOOT_NORMAL_MODE</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:ga993bbfc899c5495e5600dea34e5400bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga52853f4dcc9a1208fbb366e59efb3054"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#ga52853f4dcc9a1208fbb366e59efb3054">SYS_BOOT_NORMAL_BIN</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga52853f4dcc9a1208fbb366e59efb3054"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabcadf084776b83e26f0f3db8f0bdfbe1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#gabcadf084776b83e26f0f3db8f0bdfbe1">SYS_BOOT_TEST_BIN</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:gabcadf084776b83e26f0f3db8f0bdfbe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7fe6089cb211405115d16713b0d5060b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7fe6089cb211405115d16713b0d5060b"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SYS_CPU_80MHZ</b>&#160;&#160;&#160;80</td></tr>
<tr class="separator:ga7fe6089cb211405115d16713b0d5060b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3b060e0470873a4af714bbe36d2b342a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3b060e0470873a4af714bbe36d2b342a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SYS_CPU_160MHZ</b>&#160;&#160;&#160;160</td></tr>
<tr class="separator:ga3b060e0470873a4af714bbe36d2b342a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga09fedddfc198c6f5b12e795d7a560de2"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#ga09fedddfc198c6f5b12e795d7a560de2">flash_size_map</a> { <br />
&#160;&#160;<a class="el" href="group__System__boot__APIs.html#gga09fedddfc198c6f5b12e795d7a560de2a4c0ac10cfa5e7ecc6cc95b60e0faeb70">FLASH_SIZE_4M_MAP_256_256</a> = 0, 
<a class="el" href="group__System__boot__APIs.html#gga09fedddfc198c6f5b12e795d7a560de2a68191ccca310b30e6a0f6cfac494321c">FLASH_SIZE_2M</a>, 
<a class="el" href="group__System__boot__APIs.html#gga09fedddfc198c6f5b12e795d7a560de2a6de4efc98763d016d92d87fb73ca8849">FLASH_SIZE_8M_MAP_512_512</a>, 
<a class="el" href="group__System__boot__APIs.html#gga09fedddfc198c6f5b12e795d7a560de2a58eeb18a28a2904a2424ce808ed0e2a6">FLASH_SIZE_16M_MAP_512_512</a>, 
<br />
&#160;&#160;<a class="el" href="group__System__boot__APIs.html#gga09fedddfc198c6f5b12e795d7a560de2af31f99de17734586c910bddfe8c427bf">FLASH_SIZE_32M_MAP_512_512</a>, 
<a class="el" href="group__System__boot__APIs.html#gga09fedddfc198c6f5b12e795d7a560de2a1c1807f4d5cccfdf38f15a603e7557ce">FLASH_SIZE_16M_MAP_1024_1024</a>, 
<a class="el" href="group__System__boot__APIs.html#gga09fedddfc198c6f5b12e795d7a560de2aa88e113314ba8a3de7fe693c1c14b9a0">FLASH_SIZE_32M_MAP_1024_1024</a>
<br />
 }<tr class="separator:ga09fedddfc198c6f5b12e795d7a560de2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gadecd4fbc78bf128281c5e48055155864"><td class="memItemLeft" align="right" valign="top">uint8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#gadecd4fbc78bf128281c5e48055155864">system_get_boot_version</a> (void)</td></tr>
<tr class="memdesc:gadecd4fbc78bf128281c5e48055155864"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get information of the boot version.  <a href="#gadecd4fbc78bf128281c5e48055155864">More...</a><br /></td></tr>
<tr class="separator:gadecd4fbc78bf128281c5e48055155864"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa2fd426b0a2cb0bf77cbc0868ad63e77"><td class="memItemLeft" align="right" valign="top">uint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#gaa2fd426b0a2cb0bf77cbc0868ad63e77">system_get_userbin_addr</a> (void)</td></tr>
<tr class="memdesc:gaa2fd426b0a2cb0bf77cbc0868ad63e77"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the address of the current running user bin (user1.bin or user2.bin).  <a href="#gaa2fd426b0a2cb0bf77cbc0868ad63e77">More...</a><br /></td></tr>
<tr class="separator:gaa2fd426b0a2cb0bf77cbc0868ad63e77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0663faaa88f4c899daf21e54400dfed0"><td class="memItemLeft" align="right" valign="top">uint8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#ga0663faaa88f4c899daf21e54400dfed0">system_get_boot_mode</a> (void)</td></tr>
<tr class="memdesc:ga0663faaa88f4c899daf21e54400dfed0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the boot mode.  <a href="#ga0663faaa88f4c899daf21e54400dfed0">More...</a><br /></td></tr>
<tr class="separator:ga0663faaa88f4c899daf21e54400dfed0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf7b2162f7ed788f3e8d8d90b27f60e7f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#gaf7b2162f7ed788f3e8d8d90b27f60e7f">system_restart_enhance</a> (uint8 bin_type, uint32 bin_addr)</td></tr>
<tr class="memdesc:gaf7b2162f7ed788f3e8d8d90b27f60e7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restarts the system, and enters the enhanced boot mode.  <a href="#gaf7b2162f7ed788f3e8d8d90b27f60e7f">More...</a><br /></td></tr>
<tr class="separator:gaf7b2162f7ed788f3e8d8d90b27f60e7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae173ade9144230f0b8f950a804d4afd5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__System__boot__APIs.html#ga09fedddfc198c6f5b12e795d7a560de2">flash_size_map</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#gae173ade9144230f0b8f950a804d4afd5">system_get_flash_size_map</a> (void)</td></tr>
<tr class="memdesc:gae173ade9144230f0b8f950a804d4afd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current Flash size and Flash map.  <a href="#gae173ade9144230f0b8f950a804d4afd5">More...</a><br /></td></tr>
<tr class="separator:gae173ade9144230f0b8f950a804d4afd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0590aa925e7f87eb6cfc81d5577fc98a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#ga0590aa925e7f87eb6cfc81d5577fc98a">system_update_cpu_freq</a> (uint8 freq)</td></tr>
<tr class="memdesc:ga0590aa925e7f87eb6cfc81d5577fc98a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set CPU frequency. Default is 80MHz.  <a href="#ga0590aa925e7f87eb6cfc81d5577fc98a">More...</a><br /></td></tr>
<tr class="separator:ga0590aa925e7f87eb6cfc81d5577fc98a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ed4a3a5a4d57e26ed5250a423a5c3a0"><td class="memItemLeft" align="right" valign="top">uint8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__System__boot__APIs.html#ga9ed4a3a5a4d57e26ed5250a423a5c3a0">system_get_cpu_freq</a> (void)</td></tr>
<tr class="memdesc:ga9ed4a3a5a4d57e26ed5250a423a5c3a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get CPU frequency.  <a href="#ga9ed4a3a5a4d57e26ed5250a423a5c3a0">More...</a><br /></td></tr>
<tr class="separator:ga9ed4a3a5a4d57e26ed5250a423a5c3a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>boot APIs </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga04009897446ea5a0c5aa3d3c6ef01357"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYS_BOOT_ENHANCE_MODE&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>It can load and run firmware at any address, for Espressif factory test bin </p>

</div>
</div>
<a class="anchor" id="ga52853f4dcc9a1208fbb366e59efb3054"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYS_BOOT_NORMAL_BIN&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>user1.bin or user2.bin </p>

</div>
</div>
<a class="anchor" id="ga993bbfc899c5495e5600dea34e5400bd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYS_BOOT_NORMAL_MODE&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>It can only load and run at some addresses of user1.bin (or user2.bin) </p>

</div>
</div>
<a class="anchor" id="gabcadf084776b83e26f0f3db8f0bdfbe1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYS_BOOT_TEST_BIN&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>can only be Espressif test bin </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga09fedddfc198c6f5b12e795d7a560de2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__System__boot__APIs.html#ga09fedddfc198c6f5b12e795d7a560de2">flash_size_map</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga09fedddfc198c6f5b12e795d7a560de2a4c0ac10cfa5e7ecc6cc95b60e0faeb70"></a>FLASH_SIZE_4M_MAP_256_256&#160;</td><td class="fielddoc">
<p>Flash size : 4Mbits. Map : 256KBytes + 256KBytes </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga09fedddfc198c6f5b12e795d7a560de2a68191ccca310b30e6a0f6cfac494321c"></a>FLASH_SIZE_2M&#160;</td><td class="fielddoc">
<p>Flash size : 2Mbits. Map : 256KBytes </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga09fedddfc198c6f5b12e795d7a560de2a6de4efc98763d016d92d87fb73ca8849"></a>FLASH_SIZE_8M_MAP_512_512&#160;</td><td class="fielddoc">
<p>Flash size : 8Mbits. Map : 512KBytes + 512KBytes </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga09fedddfc198c6f5b12e795d7a560de2a58eeb18a28a2904a2424ce808ed0e2a6"></a>FLASH_SIZE_16M_MAP_512_512&#160;</td><td class="fielddoc">
<p>Flash size : 16Mbits. Map : 512KBytes + 512KBytes </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga09fedddfc198c6f5b12e795d7a560de2af31f99de17734586c910bddfe8c427bf"></a>FLASH_SIZE_32M_MAP_512_512&#160;</td><td class="fielddoc">
<p>Flash size : 32Mbits. Map : 512KBytes + 512KBytes </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga09fedddfc198c6f5b12e795d7a560de2a1c1807f4d5cccfdf38f15a603e7557ce"></a>FLASH_SIZE_16M_MAP_1024_1024&#160;</td><td class="fielddoc">
<p>Flash size : 16Mbits. Map : 1024KBytes + 1024KBytes </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga09fedddfc198c6f5b12e795d7a560de2aa88e113314ba8a3de7fe693c1c14b9a0"></a>FLASH_SIZE_32M_MAP_1024_1024&#160;</td><td class="fielddoc">
<p>Flash size : 32Mbits. Map : 1024KBytes + 1024KBytes </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga0663faaa88f4c899daf21e54400dfed0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8 system_get_boot_mode </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the boot mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>#define SYS_BOOT_ENHANCE_MODE 0 </dd>
<dd>
#define SYS_BOOT_NORMAL_MODE 1 </dd></dl>

</div>
</div>
<a class="anchor" id="gadecd4fbc78bf128281c5e48055155864"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8 system_get_boot_version </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get information of the boot version. </p>
<dl class="section attention"><dt>Attention</dt><dd>If boot version &gt;= 1.3 , users can enable the enhanced boot mode (refer to system_restart_enhance).</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Information of the boot version. </dd></dl>

</div>
</div>
<a class="anchor" id="ga9ed4a3a5a4d57e26ed5250a423a5c3a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8 system_get_cpu_freq </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get CPU frequency. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPU frequency, unit : MHz. </dd></dl>

</div>
</div>
<a class="anchor" id="gae173ade9144230f0b8f950a804d4afd5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__System__boot__APIs.html#ga09fedddfc198c6f5b12e795d7a560de2">flash_size_map</a> system_get_flash_size_map </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current Flash size and Flash map. </p>
<p>Flash map depends on the selection when compiling, more details in document "2A-ESP8266__IOT_SDK_User_Manual"</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>enum flash_size_map </dd></dl>

</div>
</div>
<a class="anchor" id="gaa2fd426b0a2cb0bf77cbc0868ad63e77"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32 system_get_userbin_addr </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the address of the current running user bin (user1.bin or user2.bin). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The address of the current running user bin. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf7b2162f7ed788f3e8d8d90b27f60e7f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool system_restart_enhance </td>
          <td>(</td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>bin_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32&#160;</td>
          <td class="paramname"><em>bin_addr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Restarts the system, and enters the enhanced boot mode. </p>
<dl class="section attention"><dt>Attention</dt><dd>SYS_BOOT_TEST_BIN is used for factory test during production; users can apply for the test bin from Espressif Systems.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uint8</td><td>bin_type : type of bin<ul>
<li>#define SYS_BOOT_NORMAL_BIN 0 // user1.bin or user2.bin</li>
<li>#define SYS_BOOT_TEST_BIN 1 // can only be Espressif test bin </li>
</ul>
</td></tr>
    <tr><td class="paramname">uint32</td><td>bin_addr : starting address of the bin file</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="ga0590aa925e7f87eb6cfc81d5577fc98a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool system_update_cpu_freq </td>
          <td>(</td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>freq</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set CPU frequency. Default is 80MHz. </p>
<p>System bus frequency is 80MHz, will not be affected by CPU frequency. The frequency of UART, SPI, or other peripheral devices, are divided from system bus frequency, so they will not be affected by CPU frequency either.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uint8</td><td>freq : CPU frequency, 80 or 160.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Mar 1 2016 10:19:26 for ESP8266_RTOS_SDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
